//------------------------------
// The fastMavlink library
// (c) OlliW, OlliW42, www.olliw.eu
//------------------------------

#pragma once
#ifndef FASTMAVLINK_PWRLINK_H
#define FASTMAVLINK_PWRLINK_H

#ifdef __cplusplus
extern "C" {
#endif

#ifndef FASTMAVLINK_BUILD_DATE
#define FASTMAVLINK_BUILD_DATE  "Thu Nov 28 2024"
#endif

#ifndef FASTMAVLINK_DIALECT_VERSION
#define FASTMAVLINK_DIALECT_VERSION  2  // this is the version specified in the dialect xml file
#endif


//------------------------------
//-- Message credentials
//-- The values of msg_entry_t for all messages in the dialect.
//-- msgid, extra crc, max length, flag, target sysid offset, target compid offset
//------------------------------

#include "PwrLink_msg_entries.h"

#ifndef FASTMAVLINK_MESSAGE_CRCS
#define FASTMAVLINK_MESSAGE_CRCS  FASTMAVLINK_MSG_ENTRIES
#endif


//------------------------------
//-- FastMavlink lib
//------------------------------

#include "../lib/fastmavlink.h"

#ifdef FASTMAVLINK_PYMAVLINK_ENABLED
#include "../lib/fastmavlink_pymavlink.h"
#endif


//------------------------------
//-- Enum definitons
//------------------------------

#ifndef FASTMAVLINK_TEST_EXCLUDE_ENUMS

#ifndef FASTMAVLINK_HAS_ENUM_PL_SYS_ID
#define FASTMAVLINK_HAS_ENUM_PL_SYS_ID
typedef enum PL_SYS_ID {
    PL_ID_HOST = 1,  // RK3588. 
    PL_ID_SLAVE = 2,  // BoxPWR. 
    PL_SYS_ID_ENUM_END = 3,  // end marker
} PL_SYS_ID;
#endif


#ifndef FASTMAVLINK_HAS_ENUM_PL_BAT_MODE
#define FASTMAVLINK_HAS_ENUM_PL_BAT_MODE
typedef enum PL_BAT_MODE {
    PL_BAT_UNKNOW = 0,  // UNKNOW Mode. 
    PL_BAT_CHARGE = 1,  // CHARGE Mode. 
    PL_BAT_DISCHARGE = 2,  // DISCHARGE Mode. 
    PL_BAT_FULL = 3,  // CHARGE FULL. 
    PL_BAT_MODE_ENUM_END = 4,  // end marker
} PL_BAT_MODE;
#endif


#ifndef FASTMAVLINK_HAS_ENUM_PL_ERR_CODE
#define FASTMAVLINK_HAS_ENUM_PL_ERR_CODE
typedef enum PL_ERR_CODE {
    PL_ERR_NONE = 0,  // No error. 
    PL_ERR_NO_INPUT = 1,  // System no input. 
    PL_ERR_IP_OUTPUT = 2,  // Ip2366 output error. 
    PL_ERR_IP_CHG = 4,  // Ip2366 charge error. 
    PL_ERR_IP_OCP = 8,  // Ip2366 over current. 
    PL_ERR_IP_OTP = 16,  // Ip2366 over temperature. 
    PL_ERR_NO_BAT = 32,  // Ip2366 no battery. 
    PL_ERR_CODE_ENUM_END = 33,  // end marker
} PL_ERR_CODE;
#endif

#endif // FASTMAVLINK_DO_NOT_INCLUDE_ENUMS


//------------------------------
//-- Message definitions
//------------------------------

#ifdef FASTMAVLINK_IGNORE_WADDRESSOFPACKEDMEMBER
  #if defined __GNUC__ && __GNUC__ >= 9
    #pragma GCC diagnostic push
    #pragma GCC diagnostic ignored "-Waddress-of-packed-member"
  #endif
#endif

#include "./mavlink_msg_pl_fdb_info.h"
#include "./mavlink_msg_pl_host_info.h"

#ifdef FASTMAVLINK_IGNORE_WADDRESSOFPACKEDMEMBER
  #if defined __GNUC__ && __GNUC__ >= 9
    #pragma GCC diagnostic pop
  #endif
#endif


//------------------------------
//-- Dialect includes
//------------------------------




#ifdef __cplusplus
}
#endif

#endif // FASTMAVLINK_PWRLINK_H
